Update Reseller Level Coefficients API
POST /updateResellerLevelCoefficients
Description
This API endpoint allows an admin to update the coefficients associated with a reseller level. These coefficients impact various metrics such as credit, sales, subscriptions, and membership duration, which determine a reseller's level within the platform.
Request Body
The request utilizes GraphQL to perform the updateResellerLevelCoefficients
mutation.
Mutation:
mutation updateResellerLevelCoefficients ($levelCoefficients: ResellerLevelCoefficientsEdit) {
updateResellerLevelCoefficients (levelCoefficients: $levelCoefficients) {
monthCreditPercent
monthCreditMax
currentCreditPercent
currentCreditMax
activeSubscriptionPercent
activeSubscriptionMax
membershipDurationPercent
membershipDurationMax
depositIntervalManualDays
depositIntervalMax
totalSalePercent
totalSaleMax
monthSalePercent
monthSaleMax
}
}
Variables:
{
"levelCoefficients": {
"monthCreditPercent": "<Month_Credit_Percent>",
"monthCreditMax": "<Month_Credit_Max>",
"currentCreditPercent": "<Current_Credit_Percent>",
"currentCreditMax": "<Current_Credit_Max>",
"activeSubscriptionPercent": "<Active_Subscription_Percent>",
"activeSubscriptionMax": "<Active_Subscription_Max>",
"membershipDurationPercent": "<Membership_Duration_Percent>",
"membershipDurationMax": "<Membership_Duration_Max>",
"depositIntervalManualDays": "<Deposit_Interval_Manual_Days>",
"depositIntervalMax": "<Deposit_Interval_Max>",
"totalSalePercent": "<Total_Sale_Percent>",
"totalSaleMax": "<Total_Sale_Max>",
"monthSalePercent": "<Month_Sale_Percent>",
"monthSaleMax": "<Month_Sale_Max>"
}
}
- levelCoefficients (ResellerLevelCoefficientsEdit Object): An object containing the updated coefficients for the reseller level.
- monthCreditPercent (String): The percentage of credit earned each month.
- monthCreditMax (String): The maximum credit that can be earned each month.
- currentCreditPercent (String): The percentage of current credit that counts towards the reseller level.
- currentCreditMax (String): The maximum amount of current credit that counts towards the reseller level.
- activeSubscriptionPercent (String): The percentage of active subscriptions that count towards the reseller level.
- activeSubscriptionMax (String): The maximum number of active subscriptions that count towards the reseller level.
- membershipDurationPercent (String): The percentage of membership duration that counts towards the reseller level.
- membershipDurationMax (String): The maximum membership duration that counts towards the reseller level.
- depositIntervalManualDays (String): The interval in days for manual deposits.
- depositIntervalMax (String): The maximum interval for deposits.
- totalSalePercent (String): The percentage of total sales that count towards the reseller level.
- totalSaleMax (String): The maximum amount of total sales that count towards the reseller level.
- monthSalePercent (String): The percentage of monthly sales that count towards the reseller level.
- monthSaleMax (String): The maximum amount of monthly sales that count towards the reseller level.
Response:
-
Success (200 OK):
- If the update is successful, the response will return the updated reseller level coefficients, confirming the changes.
{
"data": {
"updateResellerLevelCoefficients": {
"monthCreditPercent": "<Month_Credit_Percent>",
"monthCreditMax": "<Month_Credit_Max>",
"currentCreditPercent": "<Current_Credit_Percent>",
"currentCreditMax": "<Current_Credit_Max>",
"activeSubscriptionPercent": "<Active_Subscription_Percent>",
"activeSubscriptionMax": "<Active_Subscription_Max>",
"membershipDurationPercent": "<Membership_Duration_Percent>",
"membershipDurationMax": "<Membership_Duration_Max>",
"depositIntervalManualDays": "<Deposit_Interval_Manual_Days>",
"depositIntervalMax": "<Deposit_Interval_Max>",
"totalSalePercent": "<Total_Sale_Percent>",
"totalSaleMax": "<Total_Sale_Max>",
"monthSalePercent": "<Month_Sale_Percent>",
"monthSaleMax": "<Month_Sale_Max>"
}
}
} -
Error (4XX/5XX):
- Appropriate error messages and status codes will be returned in cases of invalid data, missing required fields, or server errors.
Note:
Ensure that the levelCoefficients
object contains valid and correctly formatted data according to the platform's specifications. This API should be used by admins with the necessary permissions to manage and update reseller level coefficients and related metrics.